# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AlloyDbSource do
  @moduledoc """
  AlloyDB source import data from.

  ## Attributes

  *   `clusterId` (*type:* `String.t`, *default:* `nil`) - Required. The AlloyDB cluster to copy the data from with a length limit of 256 characters.
  *   `databaseId` (*type:* `String.t`, *default:* `nil`) - Required. The AlloyDB database to copy the data from with a length limit of 256 characters.
  *   `gcsStagingDir` (*type:* `String.t`, *default:* `nil`) - Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the AlloyDB export to a specific Cloud Storage directory. Ensure that the AlloyDB service account has the necessary Cloud Storage Admin permissions to access the specified Cloud Storage directory.
  *   `locationId` (*type:* `String.t`, *default:* `nil`) - Required. The AlloyDB location to copy the data from with a length limit of 256 characters.
  *   `projectId` (*type:* `String.t`, *default:* `nil`) - The project ID that contains the AlloyDB source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.
  *   `tableId` (*type:* `String.t`, *default:* `nil`) - Required. The AlloyDB table to copy the data from with a length limit of 256 characters.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :clusterId => String.t() | nil,
          :databaseId => String.t() | nil,
          :gcsStagingDir => String.t() | nil,
          :locationId => String.t() | nil,
          :projectId => String.t() | nil,
          :tableId => String.t() | nil
        }

  field(:clusterId)
  field(:databaseId)
  field(:gcsStagingDir)
  field(:locationId)
  field(:projectId)
  field(:tableId)
end

defimpl Poison.Decoder,
  for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AlloyDbSource do
  def decode(value, options) do
    GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AlloyDbSource.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AlloyDbSource do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
